import { request } from '@/api/service'

export default {
  getUserList (params) {
    return request({
      url: '/api/user/page',
      method: 'get',
      params
    })
  },
  addUser (data) {
    return request({
      url: '/api/user/register',
      method: 'post',
      data
    })
  },
  // 编辑用户
  updateUser (data) {
    return request({
      url: '/api/user/update',
      method: 'post',
      data
    })
  },
  // 删除用户
  deleteUser (id) {
    return request({
      url: '/api/user/delete',
      method: 'get',
      params: {
        id
      }
    })
  }
}